﻿using System;
using System.Windows;
using System.Windows.Controls;


namespace WpfApplication3
{
    class MySimpleWPFAPP : Application
    {
        [STAThread]
        static void Main(string[] args)
        {
            MySimpleWPFAPP myApp = new MySimpleWPFAPP();
            myApp.Run(new MainWindow());
        }
    }

    class MainWindow : Window
    {
        private Button btnExit = new Button();
       
        public MainWindow()
        {
            btnExit.Height = 25;
            btnExit.Width = 30;
            btnExit.Content = "Exit";
            btnExit.Click += new RoutedEventHandler(btnExit_Click);

            this.AddChild(btnExit);
            this.Title = "Test";
            this.Height = 250;
            this.Width = 300;
            this.Show();
        }

        private void btnExit_Click(object sender, RoutedEventArgs e)
        {
            Application.Current.Shutdown();
        }
    }
}
